package org.webscale.util.sdb;

public class LocalIncrementalKeyGen implements SDBKeyGen{
	private static long startValue;
	private static int increment;
	
	private static long currentValue = 0;
	

	public long getNextKeyValue() {
		if(currentValue == 0){
			currentValue = startValue;
		}
		currentValue = currentValue + increment;
		return currentValue;
	}

	public long getStartValue() {
		return startValue;
	}

	public void setStartValue(long value) {
		startValue = value;
	}

	public int getIncrement() {
		return increment;
	}

	public void setIncrement(int i) {
		increment = i;
	}
	
	
}
